package org.chen.model.service.impl;

import java.util.List;
import java.util.Map;

import org.chen.model.dao.PowersMapper;
import org.chen.model.entity.Powers;
import org.chen.model.service.PowersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class PowersServiceImpl implements PowersService {

	@Autowired
	private PowersMapper powersMapper;

	@Override
	public Integer add(Powers t) {
		return powersMapper.insertSelective(t);
	}

	@Override
	public Integer update(Powers t) {
		return powersMapper.updateByPrimaryKeySelective(t);
	}

	@Override
	public Integer delete(Integer id) {
		return powersMapper.deleteByPrimaryKey(id);
	}

	@Override
	public Powers queryById(Integer id) {
		return powersMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Powers> query() {
		return powersMapper.query();
	}

	@Override
	public Long queryRowCount() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<Powers> queryByPage(Map<String, Object> pageMap) {
		// TODO Auto-generated method stub
		return null;
	}

}
